//
// Created by zhuzonghui on 2022/12/17.
//
#include <mysql.h>
#include "../../header/model/user.h"
#include "../../header/service/JurisdictionService.h"
#include "../../header/tools/MYSQL_TOOLS.h"


void wzy_change_jurisdiction_by_user_id(User *user) {
    string sql =
            "update user_jurisdiction set jurisdiction_id =" + to_string(user->getJurisdiction()->getJurisdictionId()) +
            " where user_id=" + to_string(user->getUserId());
    try {
        wzy_mysql_query(sql);
    } catch (...) {
        throw -1;
    }
}
